// 题干代码
setTimeout(function () {
  var a = 'hello'
  setTimeout(function () {
    var b = 'lagou'
    setTimeout(function () {
      var c = 'I ♥ U'
      console.log('题干代码的运行结果如下:')
      console.log(a + b + c)
    }, 10)
  }, 10)
}, 10)
// 题干代码 end

// Promise解法
const sleep = timeout => new Promise(resolve => setTimeout(resolve, timeout))
sleep(10)
  .then(() => 'hello')
  .then(res => sleep(10).then(() => res + 'lagou'))
  .then(res =>
    sleep(10).then(() => {
      console.log('Promise解法的运行结果如下:')
      console.log(res + 'I ♥ U')
    })
  )
// Promise解法
